package com.xiaxueqi.web.security;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

import com.niagara.context.SecurityContext;
import com.niagara.security.auth.entity.UserDetail;

public class LoginAction {

	private String loginId;

	public String getLoginId() {
		return loginId;
	}

	@Action(results = { @Result(name = "success", location = "../home/myhome.action", type = "redirect") })
	public String execute() {
		UserDetail detail = SecurityContext.getUserDetail();
		this.loginId = detail.getLoginId();
		return "success";
	}
}
